#ifndef RTC_H_
#define RTC_H_

#include <ctl_api.h>
#include <stdbool.h>
#include <assert.h>
#include <targets/lpc2378.h>


#define RTC_ALARMS_COUNT 6

typedef struct {
  char month;
  char day;
  int  year;
  char hour;
  char minute;
  char second;
} datetime_t;


void rtc_alarm_set(unsigned int id, int period);
bool rtc_alarm_get(unsigned int id);

void rtc_enable();
datetime_t rtc_get_time();
void rtc_set_time(datetime_t time);


#endif /* RTC_H_ */
